package com.wwwarehouse.usercenter.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.view.ViewGroup;

import java.util.List;

/**
 * @author : mundane
 * @time : 2017/9/26 15:23
 * @description :
 * @file : LazyViewPagerAdapter.java
 */

public class LazyViewPagerAdapter extends FragmentStatePagerAdapter {
	private List<Fragment> mFragmentList;
	public LazyViewPagerAdapter(FragmentManager fm, List<Fragment> fragmentList) {
		super(fm);
		this.mFragmentList = fragmentList;
	}

	@Override
	public Fragment getItem(int position) {
		return mFragmentList.get(position);
	}

	@Override
	public int getCount() {
		return mFragmentList.size();
	}

	public int getItemPosition(Object object) {
		return POSITION_NONE;
	}

	@Override
	public void destroyItem(ViewGroup container, int position, Object object) {
	}
}
